home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / x / volume3 / awm2 / part02 < prev    next >
Encoding:
Internet Message Format  |  1989-02-17  |  54.9 KB

  1. Path: uunet!wyse!mikew
  2. From: mikew@wyse.wyse.com (Mike Wexler)
  3. Newsgroups: comp.sources.x
  4. Subject: v03i018:   Ardent Window Manager, Patchlevel 9, Part02/12
  5. Message-ID: <2068@wyse.wyse.com>
  6. Date: 17 Feb 89 19:16:10 GMT
  7. Organization: Wyse Technology, San Jose
  8. Lines: 1424
  9. Approved: mikew@wyse.com
  10.  
  11. Submitted-by: kmw@ardent (Ken Wallich)
  12. Posting-number: Volume 3, Issue 18
  13. Archive-name: awm2/part02
  14.  
  15. #! /bin/sh
  16. # This is a shell archive.  Remove anything before this line, then unpack
  17. # it by saving it into a file and typing "sh file".  To overwrite existing
  18. # files, type "sh file -c".  You can also feed this as standard input via
  19. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  20. # will see the following message at the end:
  21. #        "End of archive 2 (of 12)."
  22. # Contents:  NewIconify.c awm.man
  23. # Wrapped by mikew@wyse on Fri Feb 17 10:50:20 1989
  24. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  25. if test -f 'NewIconify.c' -a "${1}" != "-c" ; then 
  26.   echo shar: Will not clobber existing file \"'NewIconify.c'\"
  27. else
  28. echo shar: Extracting \"'NewIconify.c'\" \(11004 characters\)
  29. sed "s/^X//" >'NewIconify.c' <<'END_OF_FILE'
  30. X
  31. X
  32. X
  33. X#ifndef lint
  34. Xstatic char *rcsid_NewIconify_c = "$Header: /usr/graph2/X11.3/contrib/windowmgrs/awm/RCS/NewIconify.c,v 1.2 89/02/07 21:23:10 jkh Exp $";
  35. X#endif  lint
  36. X
  37. X#include "X11/copyright.h"
  38. X/*
  39. X *
  40. X * Copyright 1987, 1988 by Ardent Computer Corporation, Sunnyvale, Ca.
  41. X *
  42. X * Copyright 1987 by Jordan Hubbard.
  43. X *
  44. X *
  45. X *                         All Rights Reserved
  46. X *
  47. X * Permission to use, copy, modify, and distribute this software and its
  48. X * documentation for any purpose and without fee is hereby granted,
  49. X * provided that the above copyright notice appear in all copies and that
  50. X * both that copyright notice and this permission notice appear in
  51. X * supporting documentation, and that the name of Ardent Computer
  52. X * Corporation or Jordan Hubbard not be used in advertising or publicity
  53. X * pertaining to distribution of the software without specific, written
  54. X * prior permission.
  55. X *
  56. X */
  57. X
  58. X/*
  59. X * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
  60. X *
  61. X *                         All Rights Reserved
  62. X *
  63. X * Permission to use, copy, modify, and distribute this software and its
  64. X * documentation for any purpose and without fee is hereby granted,
  65. X * provided that the above copyright notice appear in all copies and that
  66. X * both that copyright notice and this permission notice appear in
  67. X * supporting documentation, and that the name of Digital Equipment
  68. X * Corporation not be used in advertising or publicity pertaining to
  69. X * distribution of the software without specific, written prior permission.
  70. X *
  71. X *
  72. X * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  73. X * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  74. X * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  75. X * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  76. X * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  77. X * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  78. X * SOFTWARE.
  79. X */
  80. X
  81. X/*
  82. X * MODIFICATION HISTORY
  83. X *
  84. X * 000 -- M. Gancarz, DEC Ultrix Engineering Group
  85. X * 001 -- Loretta Guarino Reid, DEC Ultrix Engineering Group,
  86. X *  Western Software Lab. Port to X11.
  87. X */
  88. X
  89. X#include "awm.h"
  90. X
  91. X/*ARGSUSED*/
  92. XBoolean NewIconify(window, mask, button, x, y)
  93. XWindow window;                          /* Event window. */
  94. Xint mask;                               /* Button/key mask. */
  95. Xint button;                             /* Button event detail. */
  96. Xint x, y;                               /* Event mouse position. */
  97. X{
  98. X     XWindowAttributes fromInfo;    /* from window info. */
  99. X     XWindowAttributes toInfo;        /* to window info. */
  100. X     Window from, to;
  101. X     int mse_x, mse_y;            /* Mouse X and Y coordinates. */
  102. X     int new_x, new_y;            /* To U. L. X and Y coordinates. */
  103. X     int new_w, new_h;            /* To width and height. */
  104. X     int bdw;                /* border width */
  105. X     int prev_x;            /* Previous event window X location. */
  106. X     int prev_y;            /* Previous event window Y location. */
  107. X     int cur_x;                /* Current event window X location. */
  108. X     int cur_y;                /* Current event window Y location. */
  109. X     int root_x;            /* Root window X location. */
  110. X     int root_y;            /* Root window Y location. */
  111. X     int ulx, uly;            /* Event window upper left X and Y. */
  112. X     int lrx, lry;            /* Event window lower right X and Y. */
  113. X     int num_vectors;            /* Number of vectors in box. */
  114. X     int status;                /* Routine call return status. */
  115. X     int ptrmask;            /* pointer query state. */
  116. X     Window root;            /* Mouse root window. */
  117. X     Window sub_win;            /* Mouse position sub-window. */
  118. X     XEvent button_event;        /* Button event packet. */
  119. X     XSegment box[MAX_BOX_VECTORS];    /* Box vertex buffer. */
  120. X     XSegment zap[MAX_ZAP_VECTORS];    /* Zap effect vertex buffer. */
  121. X     int (*storegrid_func)();        /* Function to use for grid */
  122. X     int (*storebox_func)();        /* Function to use for box */
  123. X     AwmInfoPtr awi;
  124. X     extern Window MakeIcon();
  125. X     extern void ungrab_pointer();
  126. X     extern void grab_pointer();
  127. X     
  128. X     Entry("NewIconify")
  129. X      
  130. X     /*
  131. X      * Do not lower or iconify the root window.
  132. X      */
  133. X     if (window == RootWindow(dpy, scr))
  134. X      Leave(FALSE)
  135. X     
  136. X     /*
  137. X      * Change the cursor to the icon cursor.
  138. X      */
  139. X     grab_pointer();
  140. X     
  141. X     /*
  142. X      * Clear the vector buffers.
  143. X      */
  144. X     bzero(box, sizeof(box));
  145. X     if (Zap)
  146. X      bzero(zap, sizeof(zap));
  147. X     
  148. X     /*
  149. X      * Get info on the event window.
  150. X      */
  151. X     awi = GetAwmInfo(window);
  152. X     if (!awi)
  153. X      Leave(FALSE)
  154. X     /*
  155. X      * Are we iconifying or de-iconifying?
  156. X      */
  157. X     if (awi->state & ST_ICON) {
  158. X          from = awi->icon;
  159. X          to = (awi->frame) ? awi->frame : awi->client;
  160. X     }
  161. X     else if (awi->state & ST_WINDOW) {
  162. X          from = (awi->frame) ? awi->frame : awi->client;
  163. X          to = (awi->icon) ? awi->icon : MakeIcon(window, x, y, FALSE);
  164. X     }
  165. X     else {
  166. X          fprintf(stderr, "NewIconify: Window %x has unknown state '%x'\n",
  167. X         awi->client, awi->state);
  168. X      Leave(FALSE)
  169. X     }
  170. X     status = XGetWindowAttributes(dpy, from, &fromInfo);
  171. X     if (status == FAILURE)
  172. X          Leave(FALSE)
  173. X
  174. X     status = XGetWindowAttributes(dpy, to, &toInfo);
  175. X     if (status == FAILURE)
  176. X          Leave(FALSE)
  177. X
  178. X     /*
  179. X      * Initialize the movement variables.
  180. X      */
  181. X     ulx = x - (toInfo.width >> 1) - toInfo.border_width;
  182. X     uly = y - (toInfo.height >> 1) - toInfo.border_width;
  183. X     lrx = x + (toInfo.width >> 1) + toInfo.border_width - 1;
  184. X     lry = y + (toInfo.height >> 1) + toInfo.border_width - 1;
  185. X     prev_x = x;
  186. X     prev_y = y;
  187. X
  188. X     if (awi->frame && awi->state & ST_ICON) {
  189. X      storegrid_func = StoreTitleGridBox;
  190. X      storebox_func = StoreTitleBox;
  191. X     }
  192. X     else {
  193. X      storegrid_func = StoreGridBox;
  194. X      storebox_func = StoreBox;
  195. X     }
  196. X     
  197. X     /*
  198. X      * Store the box.
  199. X      */
  200. X     if (Grid)
  201. X      num_vectors = storegrid_func(box, ulx, uly, lrx, lry);
  202. X     else
  203. X      num_vectors = storebox_func(box, ulx, uly, lrx, lry);
  204. X     
  205. X     /*
  206. X      * Freeze the server, if requested by the user.
  207. X      * This results in a solid box instead of a flickering one.
  208. X      */
  209. X     if (Freeze)
  210. X      XGrabServer(dpy);
  211. X     
  212. X     /*
  213. X      * Process any outstanding events before drawing the box.
  214. X      */
  215. X     while (QLength(dpy) > 0) {
  216. X      XPeekEvent(dpy, &button_event);
  217. X      if (((XAnyEvent *)&button_event)->window == RootWindow(dpy, scr))
  218. X           break;
  219. X      GetButton(&button_event);
  220. X     }
  221. X     
  222. X     /*
  223. X      * Draw the box.
  224. X      */
  225. X     DrawBox();
  226. X     if (Freeze)
  227. X      Frozen = window;
  228. X     
  229. X     /*
  230. X      * We spin our wheels here looking for mouse movement or a change
  231. X      * in the status of the buttons.
  232. X      */
  233. X     Snatched = TRUE;
  234. X     while (TRUE) {
  235. X      
  236. X      /*
  237. X       * Check to see if we have a change in mouse button status.
  238. X       * This is how we get out of this "while" loop.
  239. X       */
  240. X      if (XPending(dpy) && !ProcessRequests(box, num_vectors) &&
  241. X          GetButton(&button_event)) {
  242. X           /*
  243. X        * Process the pending events, this sequence is the only
  244. X        * way out of the loop and the routine.
  245. X        */
  246. X           
  247. X           if ((button_event.type != ButtonPress) && 
  248. X           (button_event.type != ButtonRelease)) {
  249. X            continue; /* spurious menu event... */
  250. X           }
  251. X           
  252. X           /*
  253. X        * If we froze the server, then erase the last lines drawn.
  254. X        */
  255. X           if (Freeze) {
  256. X            DrawBox();
  257. X            Frozen = (Window)0;
  258. X            XUngrabServer(dpy);
  259. X           }
  260. X           
  261. X           /*
  262. X        * Save the mouse cursor location.
  263. X        */
  264. X           if (button_event.type == ButtonPress ||
  265. X           button_event.type == ButtonRelease) {
  266. X            mse_x = ((XButtonEvent *)&button_event)->x;
  267. X            mse_y = ((XButtonEvent *)&button_event)->y;
  268. X            break;
  269. X           }
  270. X      }
  271. X      else {
  272. X           /*
  273. X        * Continue to track the mouse until we get a change
  274. X        * in button status.
  275. X        */
  276. X           XQueryPointer(dpy, RootWindow(dpy, scr), 
  277. X                 &root, &sub_win, &root_x, &root_y, &cur_x,
  278. X                 &cur_y, &ptrmask);
  279. X           
  280. X           /*
  281. X        * If the mouse has moved, then make sure the box follows it.
  282. X        */
  283. X           if ((cur_x != prev_x) || (cur_y != prev_y)) {
  284. X            
  285. X            /*
  286. X             * If we've frozen the server, then erase the old box first!
  287. X             */
  288. X            if (Freeze)
  289. X             DrawBox();
  290. X            
  291. X            /*
  292. X             * Set the new box position.
  293. X             */
  294. X            ulx += cur_x - prev_x;
  295. X            uly += cur_y - prev_y;
  296. X            lrx += cur_x - prev_x;
  297. X            lry += cur_y - prev_y;
  298. X            
  299. X            /*
  300. X             * Calculate the vectors for the new box.
  301. X             */
  302. X            
  303. X            if (Grid)
  304. X             num_vectors = storegrid_func(box, ulx, uly, lrx,
  305. X                             lry);
  306. X            else
  307. X             num_vectors = storebox_func(box, ulx, uly, lrx, lry);
  308. X            
  309. X            /*
  310. X             * Draw the new box.
  311. X             */
  312. X            if (Freeze)
  313. X             DrawBox();
  314. X           }
  315. X           
  316. X           /*
  317. X        * Save the old box position.
  318. X        */
  319. X           prev_x = cur_x;
  320. X           prev_y = cur_y;
  321. X           
  322. X           /*
  323. X        * If server is not frozen, then draw the "flicker" box.
  324. X        */
  325. X           if (!Freeze) {
  326. X            DrawBox();
  327. X            DrawBox();
  328. X           }
  329. X      }
  330. X     }
  331. X     Snatched = FALSE;
  332. X     /*
  333. X      * If the button is not a button release of the same button pressed,
  334. X      * then abort the operation.
  335. X      */
  336. X     if ((button_event.type != ButtonRelease) ||
  337. X     (((XButtonReleasedEvent *)&button_event)->button != button)) {
  338. X      ResetCursor(button);
  339. X      ungrab_pointer();
  340. X      Leave(TRUE)
  341. X     }
  342. X     
  343. X     /*
  344. X      * If we are here we have committed to iconifying/deiconifying.
  345. X      */
  346. X     
  347. X     /*
  348. X      * Determine the coordinates of the icon or window;
  349. X      * normalize the window or icon coordinates if the user so desires.
  350. X      */
  351. X     new_w = toInfo.width;
  352. X     new_h = toInfo.height;
  353. X     bdw = toInfo.border_width;
  354. X     new_x = mse_x - (new_w >> 1) - bdw;
  355. X     new_y = mse_y - (new_h >> 1) - bdw;
  356. X     if ((NIcon && awi->state & ST_WINDOW) || (NWindow && awi->state & ST_ICON)) {
  357. X      if (new_x < 0) new_x = 0;
  358. X      if (new_y < 0) new_y = 0;
  359. X      if ((new_x - 1 + new_w + (bdw << 1)) > ScreenWidth) {
  360. X           new_x = ScreenWidth - new_w - (bdw << 1) + 1;
  361. X      }
  362. X      if ((new_y - 1 + new_h + (bdw << 1)) > ScreenHeight) {
  363. X           new_y = ScreenHeight - new_h - (bdw << 1) + 1;
  364. X      }
  365. X     }
  366. X     if (awi->state & ST_ICON) {
  367. X      awi->state ^= ST_ICON;
  368. X      awi->state |= (ST_WINDOW | ST_PLACED);
  369. X      if (!awi->frame)
  370. X           XRemoveFromSaveSet(dpy, awi->client);
  371. X     }
  372. X     else if (awi->state & ST_WINDOW) {
  373. X      awi->state ^= ST_WINDOW;
  374. X      awi->state |= ST_ICON;
  375. X      XAddToSaveSet(dpy, awi->client);
  376. X     }
  377. X     else
  378. X      fprintf(stderr, "NewIconify: Window state got trashed!\n");
  379. X     
  380. X     /*
  381. X      * Move the window into place.
  382. X      */
  383. X     XMoveWindow(dpy, to, new_x, new_y);
  384. X     /*
  385. X      * Map the icon window.
  386. X      */
  387. X     XMapRaised(dpy, to);
  388. X     if (Zap) {
  389. X      num_vectors = StoreZap(zap,
  390. X                 fromInfo.x,
  391. X                 fromInfo.y,
  392. X                 fromInfo.x + fromInfo.width
  393. X                 + (fromInfo.border_width << 1),
  394. X                 fromInfo.y + fromInfo.height
  395. X                 + (fromInfo.border_width << 1),
  396. X                 ulx, uly, lrx, lry);
  397. X      DrawZap();
  398. X      DrawZap();
  399. X     }
  400. X     /*
  401. X      * Unmap the event window.
  402. X      */
  403. X     XUnmapWindow(dpy, from);
  404. X     XFlush(dpy);
  405. X     ungrab_pointer();
  406. X     Leave(TRUE)
  407. X}
  408. END_OF_FILE
  409. if test 11004 -ne `wc -c <'NewIconify.c'`; then
  410.     echo shar: \"'NewIconify.c'\" unpacked with wrong size!
  411. fi
  412. # end of 'NewIconify.c'
  413. fi
  414. if test -f 'awm.man' -a "${1}" != "-c" ; then 
  415.   echo shar: Will not clobber existing file \"'awm.man'\"
  416. else
  417. echo shar: Extracting \"'awm.man'\" \(41691 characters\)
  418. sed "s/^X//" >'awm.man' <<'END_OF_FILE'
  419. X.de EX          \" Begin example
  420. X.ne 5
  421. X.if n .sp 1
  422. X.if t .sp .5
  423. X.nf
  424. X.in +.5i
  425. X..
  426. X.de EE        \" End example
  427. X.fi
  428. X.in -.5i
  429. X.if n .sp 1
  430. X.if t .sp .5
  431. X..
  432. X.TH AWM 1 "23 July 1988" "X Version 11"
  433. X.SH NAME
  434. X.PP
  435. Xawm - Window Manager X Client Application
  436. X.PP
  437. X.SH SYNOPSIS
  438. X.PP
  439. X.B awm
  440. X[
  441. X.B \-f
  442. Xfilename
  443. X] [
  444. X.B \-e
  445. Xexecfile
  446. X] [
  447. X.B \-b
  448. X] [
  449. X.B \-i
  450. X]
  451. X.PP
  452. X.SH DESCRIPTION
  453. X.PP
  454. XThe \fIawm\fP command is a window manager client 
  455. Xapplication of the window 
  456. Xserver. It is heavily based on an earlier work by M. Gancarz
  457. Xof Digital Equipment Corporation (see the end of this document for
  458. Xappropriate acknowledgments).
  459. X.PP
  460. XWhen \fIawm\fP is invoked, it traces a predefined search path
  461. Xto locate any \fIawm\fP startup files.  If no startup files
  462. Xexist, \fIawm\fP initializes itself from a built-in default file.
  463. X.PP
  464. XIf startup files exist in any of the following locations,
  465. Xtheir contents are merged together to create \fIawm\fP's configuration.
  466. XIn the case of contention, the bindings in the last file found
  467. Xoverride previous specifications.  Files in the \fIawm\fP
  468. Xsearch path are:
  469. X.EX
  470. X$LIBDIR\fI/awm/system.awmrc\fP (where $LIBDIR is defined in awm's Makefile)
  471. X$HOME\fI/.awmrc\fP
  472. X.EE
  473. X.PP
  474. XTo use only the settings defined in a single startup file,
  475. Xinclude the variables, \fBresetbindings\fP, \fBresetmenus\fP and
  476. X\fBresetgadgets\fP at the top of that specific startup file.
  477. X.PP
  478. X.SH OPTIONS
  479. X.IP "\fB\-f\fP filename"
  480. XNames an alternate file as an \fIawm\fP startup file.
  481. X.IP "\fB\-e\fP execfile"
  482. XNames a file to exec (typically a shell script invoking other clients) after
  483. Xall startup files have been loaded. This is useful for minimizing the number of
  484. Xmap/unmaps that occur when titlebars are added.
  485. X.IP "\fB\-b\fP"
  486. XCauses \fIawm\fP to ignore the system startup file.
  487. X.IP "\fB\-i\fP"
  488. XCauses \fIawm\fP to ignore $HOME/\fI.awmrc\fP.
  489. X.PP
  490. X.SH STARTUP FILE VARIABLES
  491. X.PP
  492. XVariables are typically entered first, at the top of the startup
  493. Xfile. Because of a merge with the resource manager, very few variables
  494. Xare set here now. The directives \fBresetbindings\fP, \fBresetmenus\fP
  495. Xand \fBresetgadgets\fP are still allowed, as are gadget declarations of
  496. Xthe form:
  497. X.EX
  498. X\fBgadget[\fP\fIn\fB]\fP=\fIexpr\fP
  499. X.EE
  500. X.PP
  501. XWhere \fIn\fP is a positive integer indicating the gadget to initialize and
  502. X\fIexpr\fP is one of the following:
  503. X.IP "\fIstring\fP or ""\fIstring\fP"" [ ^ \fIattributes\fP ]"
  504. XSet the name of the gadget to \fIstring\fP. The name will be
  505. Xpainted in the gadget box with the \fBgadget.font\fP resource
  506. Xor an overriding font attribute (see below).
  507. X\fIstring\fP may contain embedded non-alphanumeric characters
  508. Xin the form of \\\fI#\fP where \fI#\fP is one or more decimal digits (i.e. \\54)
  509. Xor \\\fIc\fP where \fIc\fP is a character in the standard C string
  510. Xliteral set (i.e. n, r, t, f). This is useful if you've specified
  511. Xa gadget font with glyphs in it (such as cursor) and you want to paint
  512. Xa specific glyph from it in a gadget box. Many such glyphs are not
  513. Xrepresented by ascii characters.
  514. X.IP "(\fIstring\fP) [ ^ \fIattributes\fP ]"
  515. XLoad a pixmap from the file named by \fIstring\fP and
  516. Xtile the gadget with it (see also: \fBpath\fP).
  517. X.PP
  518. XAdditional \fIattributes\fP may be specified after a '^' (caret)
  519. Xcharacter in the form:
  520. X.IP "\fIoffset\fP|\fIgravity\fP|\fIforeground\fP|\fIbackground\fP|\fIfont\fP"
  521. XAny omitted parameters will be set to default values.
  522. X.IP
  523. X\fIoffset\fP is an integer specifying how far to place this
  524. Xgadget from its nearest neighbor (or an edge). Default
  525. Xoffset is \fBgadget.pad\fP, or 2 if \fBgadget.pad\fP is not
  526. Xdefined.
  527. X.IP
  528. X\fIgravity\fP is one of \fBNoGravity\fP, \fBLeftGravity\fP,
  529. X\fBRightGravity\fP or \fBCenterGravity\fP. \fBNoGravity\fP specifies that
  530. Xthe gadget is to be placed opposite of wherever the last gadget was
  531. Xplaced.
  532. X\fBLeftGravity\fP specifies that the gadget should stick to
  533. Xthe left of the title bar, \fBRightGravity\fP to the right and
  534. X\fBCenterGravity\fP to the center.
  535. X.IP
  536. X\fIforeground\fP and \fIbackground\fP specify the colors used to
  537. Xtile the gadget or draw the text.
  538. X.IP
  539. X\fIfont\fP is the name of the font you want the gadget's name
  540. Xdrawn in. This overrides the \fBgadget.font\fP setting for this
  541. Xgadget.
  542. X.IP
  543. XThe default values for \fIattributes\fP are 0, \fBNoGravity\fP, black
  544. X(\fBreverse\fP: white) and white (\fBreverse\fP: black), the setting
  545. Xof \fBgadget.font\fP.
  546. X.PP
  547. XIt is important to note that in the absence of a \fIgravity\fP specification
  548. X(i.e. we've defaulted to \fBNoGravity\fP), the window manager will
  549. Xautomatically place a gadget on the side opposite of the last gadget
  550. Xplaced. If it's the first gadget placed, it will go to the right.
  551. XThus in the absence of any \fIgravity\fP (or \fIoffset\fP) specifications,
  552. Xthe window manager will place gadgets in a right-left-right fashion
  553. Xuntil all gadgets have been placed.
  554. X.PP
  555. XFor example:
  556. X.EX
  557. Xgadget[0] = "die"
  558. Xgadget[1] = (resize.b) ^ 2 | red | orange
  559. Xgadget[2] = (iconbox.b) ^ | LeftGravity
  560. Xgadget[3] = "\\56" ^ | LeftGravity | green | black | cursor
  561. X.EE
  562. X.PP
  563. XThese declarations will create 4 gadget boxes, situated in the
  564. Xfollowing manner:
  565. X.PP
  566. XThe first gadget box will be created wide enough to print the
  567. Xword "die" in it (in whatever gadget font has been defined) and
  568. Xwill be placed on the right side (since it hasn't chosen a gravity)
  569. Xagainst the edge (since it hasn't chosen an offset).
  570. XBackground and foreground colors will be black and white
  571. X(assignment depending on whether \fBreverse\fP is set).
  572. X.PP
  573. XThe second gadget box will be tiled with the contents of the
  574. Xfile "resize.b" (assuming that it's a valid bitmap file) and
  575. Xwill go on the left side (since it also has no gravity and the
  576. Xlast one went on the right). It will be offset from the edge by 2
  577. Xpixels since there was an offset for it. Foreground will be
  578. Xred, background will be orange.
  579. X.PP
  580. XThe third gadget will be tiled with the contents of "iconbox.b"
  581. Xand will be placed against the second gadget on the left hand
  582. Xside since we specified a gravity. Colors will be black and white
  583. X(depending on \fBreverse\fP).
  584. X.PP
  585. XThe fourth gadget will display glyph #56 from the cursor font
  586. Xin green and black (it's gumby of course).
  587. X.PP
  588. XIMPORTANT: Gadgets may be declared in any order, but you are
  589. Xnot allowed to leave gaps, i.e..it's perfectly acceptable to
  590. Xdeclare gadgets in the order 0, 2, 3, 1, but \fBnot\fP legal to
  591. Xdeclare gadgets in the order 0, 3, 2, 4 as gadget #1 has been
  592. Xomitted. This restriction may be removed in the future, but
  593. Xfor now you'll get a diagnostic and \fIawm\fP will exit.
  594. X.PP
  595. XAll other variables controlling window manager behavior are described in
  596. Xthe \fBX DEFAULTS\fP section of this man page.
  597. X.PP
  598. X.SH BINDING SYNTAX
  599. X.PP
  600. XMouse buttons may be bound to particular window manager functions with:
  601. X.EX
  602. X"\fIfunction\fP=[\fImodifier key(s)\fP]:[\fIcontext\fP]:\fImouse events\fP:\fI" menu name "\fP
  603. X.EE
  604. Xor 
  605. X.EX
  606. X"\fIfunction\fP=[\fImodifier key(s)\fP]:[\fIcontext\fP]:\fImouse events\fP:\fI" text action "\fP
  607. X.EE
  608. X.PP
  609. XFunction and mouse events are the only required fields.  The menu name is
  610. Xrequired with the \fIf.menu\fP function definition only.
  611. XSimilarly, text action is required only with the \fIf.action\fP
  612. Xfunction definition.
  613. X.PP
  614. X.SH Function
  615. X.PP
  616. X.IP \fBf.action\fP
  617. XInvokes a text action. `text' should be in quotes with a preceding
  618. X"action" character (one of '^', '!' or '|'). The syntax is identical to
  619. Xmenu text actions which are discussed in greater detail under the \fBMenus\fP
  620. Xsection of this document.
  621. X.EX 0
  622. X.B
  623. Xf.action=[\fImodifier key(s)\fP]:[\fIcontext \fP]:\fImouse events\fP:\fIaction" text "\fP
  624. X.EE
  625. X.IP "\fBf.beep\fP" 15
  626. Xemits a beep from the keyboard.  Loudness is determined by 
  627. Xthe volume variable.
  628. X.IP \fBf.circledown\fP
  629. Xcauses the top window that is obscuring another 
  630. Xwindow to drop to the bottom of the stack of windows.  
  631. X.IP \fBf.circleup\fP
  632. Xexposes the lowest window that is obscured by other
  633. Xwindows. 
  634. X.IP \fBf.continue\fP
  635. Xreleases the window server display action after you 
  636. Xstop action with the \fBf.pause\fP function.  
  637. X.IP \fBf.destroy\fP
  638. Xcalls XKillClient on the selected window. Use with caution!! Binding it to
  639. Xnaked mouse buttons is probably not a good idea!
  640. X.IP \fBf.exit\fP
  641. Xexits the window manager. If you've started \fIawm\fP from
  642. X\fIxinit\fR (actually sort of useful now that the \fB\-e\fP flag
  643. Xhas been added), this will also exit the window system.
  644. X.IP \fBf.focus\fP
  645. Xdirects all keyboard input to the selected window.
  646. XTo reset the focus to all windows, invoke \fIf.focus\fP from the root
  647. Xwindow.
  648. X.IP \fBf.iconify\fP
  649. XWhen implemented from a window, this function converts the window 
  650. Xto its respective icon.  When implemented from an icon, 
  651. Xf.iconify converts the icon to its respective window.  
  652. X.IP \fBf.lock\fP
  653. Xlocks the screen by displaying random (and somewhat pretty) patterns.
  654. XThe lock can be exited by typing in your password or pulling the power
  655. Xcord for your system out of its socket.
  656. X.IP \fBf.lower\fP
  657. Xlowers a window that is obstructing a window below it.
  658. X.IP \fBf.menu\fP
  659. Xinvokes a menu.  Enclose `menu name' in quotes if it
  660. Xcontains blank characters or parentheses.  
  661. X.EX 0
  662. X.B
  663. Xf.menu=[\fImodifier key(s)\fP]:[\fIcontext \fP]:\fImouse events\fP:\fI" menu name "\fP
  664. X.EE
  665. X.IP \fBf.move\fP
  666. Xmoves a window or icon to a new location, which becomes the
  667. Xdefault location.
  668. X.IP \fBf.moveopaque\fP
  669. Xmoves a window or icon to a new screen location.  When using this
  670. Xfunction, the entire window or icon is moved to the new screen
  671. Xlocation.  The grid effect is not used with this function.
  672. X.IP \fBf.neaten\fP
  673. Xneatens the desktop using the RTL neaten package. See the \fBX DEFAULTS\fP
  674. Xfor the resources necessary to customize this somewhat complex feature.
  675. XThis function only works if \fIawm\fP has been compiled with the -DNEATEN
  676. Xflag (which compiles in the neaten package). Invoking this function without
  677. Xthis is a noop (though a warning diagnostic is printed to stderr).
  678. XSee the INSTALLATION section of the README document for more details.
  679. X.IP \fBf.newiconify\fP
  680. Xallows you to create a window or icon and then position the window or
  681. Xicon in a new default location on the screen.
  682. X.IP \fBf.pause\fP
  683. Xtemporarily stops all display action.  To release the screen and
  684. Ximmediately update all windows, use the \fBf.continue\fP function.
  685. X.IP \fBf.pushdown\fP
  686. Xmoves a window down.  
  687. XThe distance of the push is determined by the push variables.
  688. X.IP \fBf.pushleft\fP
  689. Xmoves a window to the left.  
  690. XThe distance of the push is determined by the push variables.
  691. X.IP \fBf.pushright\fP
  692. Xmoves a window to the right.  
  693. XThe distance of the push is determined by the push variables.
  694. X.IP \fBf.pushup\fP
  695. Xmoves a window up.  
  696. XThe distance of the push is determined by the push variables.
  697. X.IP \fBf.raise\fP
  698. Xraises a window that is being obstructed by a window
  699. Xabove it.
  700. X.IP \fBf.refresh\fP
  701. Xresults in exposure events being sent to the window server clients 
  702. Xfor all exposed or partially exposed windows.
  703. XThe windows will not refresh correctly if the exposure events 
  704. Xare not handled properly.
  705. X.IP \fBf.resize\fP
  706. Xresizes an existing window.  Note that some clients, notably
  707. Xeditors, react unpredictably if you resize the window while the
  708. Xclient is running.
  709. X.IP \fBf.restart\fP
  710. Xcauses the window manager application to restart,
  711. Xretracing the \fIawm\fP search path and initializing the variables it
  712. Xfinds.
  713. X.IP \fBf.\fP[\fBno\fP]\fBdecorate\fP
  714. Xadds or removes "decorations" on the selected window. What decorations are
  715. Xadded (or deleted) depends on the settings of various booleans and
  716. Xclient-specific resources (see: \fBSPECIAL RESOURCES\fP).
  717. X
  718. XThe booleans \fBtitles\fP, \fBgadgets\fP and \fBborderContext.width\fP
  719. Xcurrently influence \fBawm\fP's choice of default decorations.
  720. X.PP
  721. X.SH Modifier Keys
  722. X.PP
  723. XIt is preferable to use meta as a modifier key for \fBawm\fP (or
  724. Xany other window manager, for that matter), but one may also
  725. Xuse ctrl, shift, lock, or null (no modifier key).  
  726. XModifier keys must be entered in lower case, and can be
  727. Xabbreviated as: c, l, m, s  for ctrl, lock, meta, and shift,
  728. Xrespectively. It's also permissible to refer to the the modifier
  729. Xkeys directly as "mod1, mod2, mod3, mod4 or mod5". A mouse button
  730. Xwith no modifier key(s) is often referred to as a "naked" mouse
  731. Xbutton.
  732. X.PP
  733. XYou may bind any number of modifier keys to a function,
  734. Xuse the bar (|) character to combine them.
  735. X.PP
  736. X.SH Context
  737. X.PP
  738. XThe context refers to the screen location of the cursor when a 
  739. Xcommand is initiated.  When you include a context entry in a 
  740. Xbinding, the
  741. Xcursor must be in that context or the function will not be
  742. Xactivated.
  743. XThe window manager recognizes the following seven contexts: 
  744. Xicon, window, root, title, gadget[\fIn\fP] (where \fIn\fP is the
  745. Xgadget number), border and (null).
  746. X.PP
  747. XThe icon context refers to any icon and may be safely bound without
  748. Xinterfering with window events.
  749. X.PP
  750. XThe window context refers to application windows and should be
  751. Xused carefully to avoid usurping button events that applications
  752. Xmay want for their own purposes.
  753. X.PP
  754. XThe root context refers to the root, or background window.
  755. X.PP
  756. XThe title context refers to the titlebar area of a window, if
  757. Xone exists.
  758. X.PP
  759. XThe gadget context (with mandatory index) specifies a given
  760. Xgadget box. Binding to a gadget that's undefined (not initialized to
  761. Xanything) is an error.
  762. X.PP
  763. XThe border context refers to the artificial border area created when
  764. Xthe resource \fBborderContext.width\fP is defined (see \fBborderContext.width\fP
  765. Xunder \fBX DEFAULTS\fP). Using this context when no border area exists
  766. X(i.e. \fBborderContext.width\fP is not defined) is a noop.
  767. X.PP
  768. XA (null) context is indicated when the context field is left blank,
  769. Xand allows a function to be invoked from any screen location. This
  770. Xis basically equivalent to specifying all the possible contexts.
  771. X.PP
  772. XCombine contexts using the bar (|) character.
  773. X.PP
  774. X.SH Mouse Buttons
  775. X.PP
  776. XAny of the following mouse buttons are accepted (in lower case)
  777. Xand may be abbreviated as l, m, or r, respectively:  left, 
  778. Xmiddle, right.
  779. X.PP
  780. XWith the specific button, you must identify 
  781. Xthe action of that button.  Mouse actions 
  782. Xcan be: 
  783. X.IP "\fBdown\fP" 10 
  784. Xfunction occurs when the specified button is pressed down.
  785. X.IP \fBup\fP
  786. Xfunction occurs when the specified button is released.
  787. X.IP "\fBdelta\fP" 10
  788. Xindicates that the mouse must be moved the number of pixels specified 
  789. Xwith the delta variable before the specified function is invoked.
  790. XThe mouse can be moved in any direction 
  791. Xto satisfy the delta requirement.
  792. X.PP
  793. X.SH MENU DEFINITION 
  794. X.PP
  795. XAfter binding a set of function keys and a menu name to
  796. X\fBf.menu\fP, you must define the menu to be invoked, using the
  797. Xfollowing syntax:
  798. X.EX
  799. X\fBmenu \fP= (\fIstring\fP) " \fImenu name\fP " {
  800. X"\fIitem name\fP" : "\fIaction\fP"
  801. X       . 
  802. X       .
  803. X       .
  804. X}
  805. X.EE
  806. X.PP
  807. XThe \fIstring\fP in parenthesis is an optional argument which
  808. Xnames a pixmap file (see also: \fBpath\fP) to use as
  809. Xthe menu title rather than just using the name of the menu. This
  810. Xis generally only useful if you're using pixmaps for the menu
  811. Xpanes as well (see below). Though the \fImenu name\fP isn't displayed
  812. Xwhen you specify \fIstring\fP, you still need to specify one for \fIawm\fP
  813. Xto use when looking up the binding to it.
  814. X.PP
  815. XEnter the \fImenu name\fP exactly the way it is entered with the 
  816. X\fBf.menu\fP function or the window manager will not recognize the link.
  817. XIf the \fImenu name\fP contains blank strings, tabs or parentheses, it must
  818. Xbe quoted here and in the \fBf.menu\fP function entry.  If you haven't
  819. Xchosen to display a pixmap title in \fIstring\fP, the menu name will be
  820. Xdisplayed at the top of the menu in whatever font has been chosen
  821. Xfor \fBmenu.boldFont\fP (or its default).
  822. X.PP
  823. XYou can enter as many menu items as your screen is long.  You  
  824. Xcannot scroll within menus.
  825. X.PP
  826. XAny menu entry that contains quotes, special characters,
  827. Xparentheses, tabs, or strings of blanks must be enclosed 
  828. Xin double quotes.  Follow the item name by a colon (:).
  829. X.PP
  830. XA special case is an item surrounded by parenthesis, which
  831. Xdesignates the \fIitem name\fP as the name of a pixmap file to
  832. Xtile the menu pane with. Given a pixmap for the menu title as well
  833. X(see above), it's possible to create menus that are totally
  834. Xpictorial in nature. There are, however, two caveats. Due to the fact
  835. Xthat it's easier to do, the pixmaps are used as backgrounds
  836. Xfor the menu panes rather than painting them on whenever a given pane in
  837. Xexposed. This has rather ugly consequences if one of the pixmaps
  838. X(or a line of text if a pane is textual) is larger than the others.
  839. XSince the server replicates pixmaps over the entire window, it results
  840. Xin a "wallpaper" effect on the smaller pixmaps. The solution is to make all
  841. Xthe pixmaps the same size and/or not mix in any text items that will need a
  842. Xwider pane. 
  843. X.PP
  844. XThe second problem is that the check marks and pull-right indicators are
  845. Xalways displayed in fixed positions on the right and left edges of menu
  846. Xpanes. If your pixmaps try to use this real-estate, they may be partially
  847. Xcovered by a check mark or pull-right pixmap. Design your menus with this
  848. Xin mind.
  849. X.PP
  850. X.SH Menu Action
  851. X.IP "Window manager functions"
  852. XAny function previously described, e.g., \fBf.move\fP or \fBf.iconify\fP.
  853. XUsing \fBf.menu\fP results in a pull-right pane which you can use to "walk"
  854. Xbetween menus (see below). A "walk" can be done by moving the cursor onto
  855. Xthe pull-right arrow displayed at the right edge of the pane, or by clicking
  856. Xanother button in the pane while holding the original one down.
  857. X.IP "Walking menus"
  858. XSelect the function \fBf.menu\fP and separate it from the \fImenu name\fP with
  859. Xa colon (:) i.e.
  860. X.EX
  861. Xmenu = "foo" {
  862. X...
  863. XWalking Menu:        f.menu:  "NextMenu"
  864. X...
  865. X}
  866. X.EE
  867. X.IP "Text actions"
  868. XThere are two kinds of special "actions" involving arbitrary strings
  869. Xof text. These are:
  870. X.IP "Shell commands"
  871. XBegin with an exclamation point (!) and set to run in
  872. Xbackground.  You cannot include a new line character within a shell
  873. Xcommand. 
  874. X.IP "Text strings"
  875. XText strings are placed in the window server's cut buffer. The strings
  876. Xmust be preceeded by one of:
  877. X.IP
  878. XA carat (^), which is stripped off, signifies that
  879. Xthe string will automatically be followed by a newline (I.E using '^'
  880. Xcauses one to be added at the end).
  881. X.IP
  882. XA vertical bar (|), also stripped off, signifies the the string
  883. Xshould not end with a newline.
  884. X.IP "Booleans"
  885. XAny boolean variable previously described, e.g., \fBreverse\fP or
  886. X\fBautoraise\fP.  The current state of a boolean variable in a menu
  887. Xwill be indicated with a check mark (a check mark means the boolean is
  888. Xset to true). Note that the boolean is *not* preceeded by "awm." as
  889. Xit is in the resource database.
  890. X.PP
  891. XSPECIAL NOTE:
  892. X.PP
  893. XMenus bound to title bars, gadget boxes or borders cause (where logical)
  894. Xthe selected menu action to occur automatically on the client window
  895. Xas opposed to having to select a window for the action. However, actions
  896. Xrequiring mouse tracking (i.e. move, resize) will usually \fBnot\fP work well
  897. Xin this context. While this limitation will be eliminated in the near future,
  898. Xit is suggested that you use this feature to do things that do not
  899. Xrequire mouse tracking, such as raise, lower, iconify, etc.
  900. X.PP
  901. X.SH Color Defaults
  902. X.PP
  903. XColors default to the colors of the root window 
  904. Xunder any of the following conditions:
  905. X.IP 1)
  906. XIf you run out of color map entries, either before or during an
  907. Xinvocation of \fIawm\fP.
  908. X.IP 2)
  909. XIf you specify a foreground or background color that does 
  910. Xnot exist in the RGB color database ($LIBDIR/\fIrgb.txt\fP).
  911. X.IP 3)
  912. XIf you omit a foreground or background color.
  913. X.IP 4)
  914. XIf you specify no colors in the resource database.
  915. X.bp
  916. X.SH X DEFAULTS
  917. X.PP
  918. XA number of variables that used to be specified in the \fI.uwmrc\fP file (of
  919. X\fIuwm\fP, for those familiar with it) are now retrieved from
  920. Xthe resource database. When a value cannot be found, a default 
  921. X(compiled into \fIawm\fP) is substituted. A much wider range of
  922. Xoptions can be specified this way and it is suggested that you
  923. Xread the following section carefully before bringing up
  924. Xawm.
  925. X.PP
  926. XIn the descriptions below, variable names are listed in boldface,
  927. Xtheir type in parenthesis, and their default value in double quotes.
  928. XAll resources are preceeded by an implied "awm.", as is the standard.
  929. XI.E. "autoraise" would be specified as: "awm.autoraise: ..." in the
  930. Xresource database.
  931. X.sp
  932. X.IP "\fBautoraise\fP (boolean) ``off''"
  933. XAutomatically raise a window to the top when it gains the
  934. Xinput focus. See also: \fBraiseDelay\fP
  935. X.IP "\fBautoselect\fP (boolean) ``off''"
  936. XSpecifies that the pointer be placed over the first
  937. Xitem in a menu, rather than the title, when the menu is popped up.
  938. X.IP "\fBbackground\fP (string)"
  939. XThe default background color for all other color
  940. Xchoices in \fIawm\fP. If \fBreverse\fP is not set, this defaults
  941. Xto white, otherwise it defaults to black.
  942. XReferences to \fBbackground\fP in this document
  943. Xrefer to this resource.
  944. X.IP "\fBborder.foreground\fP (boolean) ``\fBforeground\fP''"
  945. XSpecifies the border color to use for all windows (this color
  946. Xmay be drawn solid or stippled, depending on the window focus and
  947. Xthe setting of \fBborder.hilite\fP).
  948. X.IP "\fBborder.hilite\fP (boolean) ``on''"
  949. XSpecifies whether or not window border colors are to
  950. Xbe changed on focus changes. On focus in, the window border is
  951. Xchanged to solid \fBborder.foreground\fP. On focus out, it is changed to a
  952. X"gray" stipple.
  953. X.IP "\fBborderContext.background\fP (string) ``\fBbackground\fP''"
  954. XBackground color to use for border context pixmap.
  955. XValue is meaningless if \fBborderContext.width\fP and \fBborderContext.pixmap\fP are undefined.
  956. X.IP "\fBborderContext.boldPixmap\fP (string) ``none''"
  957. XThe name of a pixmap file to load and tile the border context area
  958. Xwith when the focus is in. If this is defined, and \fBhilite\fP is set,
  959. Xfocus changes will cause the border context background to alternate between
  960. X\fBborderContext.pixmap\fP and \fBborderContext.boldPixmap\fP. If \fBborderContext.boldPixmap\fP
  961. Xis defined, but \fBborderContext.pixmap\fP is not, a blank pixmap will be used in place of
  962. X\fBborderContext.pixmap\fP.
  963. X.IP "\fBborderContext.cursor\fP (int) ``XC_cross''"
  964. XGlyph (in decimal) to retrieve from cursor font for use in
  965. Xborder context.
  966. X.IP "\fBborderContext.foreground\fP (string) ``\fBforeground\fP''"
  967. XForeground color to use for border color pixmap.
  968. XValue is meaningless if \fBborderContext.width\fP and \fBborderContext.pixmap\fP are undefined.
  969. X.IP "\fBborderContext.pixmap\fP (string) ``\fBbackground\fP"
  970. XPixmap to display as border context area background.
  971. XValue is meaningless is \fBborderContext.width\fP is undefined (or set to zero).
  972. XUsed exclusively as the background unless \fBborderContext.boldPixmap\fP and
  973. X\fBhilite\fP are defined.
  974. X.IP "\fBborderContext.width\fP (int) ``0''"
  975. XNumber of pixels wide to make the border context. Though
  976. Xfunctions may be bound to the border context (see: \fBContext\fP)
  977. Xwithout setting this, they will be impossible to invoke due to the
  978. Xfact that there will be nothing to click on. The border context
  979. Xshould not be confused with the actual window border. It is an
  980. Xartificial area around each window that resembles a border.
  981. X.IP "\fBdelta\fP (int) ``1''"
  982. XNumber of pixels that must be moved over before a "delta" action
  983. Xis taken (see: \fBBINDING SYNTAX\fP).
  984. X.IP "\fBforeground\fP (string)"
  985. XThe default foreground color for all other color
  986. Xchoices in \fIawm\fP. If \fBreverse\fP is not set, this defaults
  987. Xto black, otherwise it defaults to white. 
  988. XReferences to \fBforeground\fP in this document
  989. Xrefer to this resource.
  990. X.IP "\fBframeFocus\fP (boolean) ``off''"
  991. X[De]highlight when the pointer [leaves] enters the "frame" of the
  992. Xwindow (the frame includes the client window, title bar and border context
  993. Xareas, if present). Setting this option also causes the focus to follow
  994. Xthe pointer so that keyboard input will go the the client regardless of
  995. Xwhere the pointer is in the "frame".
  996. X.IP "\fBfreeze\fP (boolean) ``off''"
  997. XLock out all other clients during certain window manager tasks,
  998. Xsuch as move and resize.
  999. X.IP "\fBgadget.border\fP (int) ``1''"
  1000. XThe width of all gadget borders in pixels.
  1001. X.IP "\fBgadget.font\fP (string) ``fixed''"
  1002. XWhich font to use for (textual) gadget labels.
  1003. X.IP "\fBgadget.pad\fP (int) ``3''"
  1004. XThe number of pixels to pad a gadget from its neighbor if it has
  1005. Xno offset defined.
  1006. X.IP "\fBgadgets\fP (boolean) ``off''"
  1007. XDisplay gadgets in title bars, if any are declared.
  1008. X.IP "\fBgrid\fP (boolean) ``off''"
  1009. XDisplay a finely ruled grid when positioning or resizing
  1010. Xwindows/icons.
  1011. X.IP "\fBhilite\fP (boolean) ``off''"
  1012. XCauses the following actions to occur when a window gains the input
  1013. Xfocus:
  1014. X.EX
  1015. X1. If \fBshowName\fP is on:
  1016. X
  1017. X   1a.    If \fBtitle.boldFont\fP is defined, the window name is redrawn
  1018. X    in this font.
  1019. X
  1020. X   1b.    If it's not, then the window name is redrawn in reverse video.
  1021. X
  1022. X2. If \fBtitle.boldPixmap\fP is defined, the background of the title bar
  1023. X   is set to it.
  1024. X
  1025. X3. If \fBborderContext.boldPixmap\fP is defined, the background of the border
  1026. X   context area is set to it.
  1027. X.EE
  1028. X.IP
  1029. XOn focus out, the window name is redrawn in \fBtitle.font\fP
  1030. Xthe title background to \fBtitle.pixmap\fP and the border context
  1031. Xto \fBborderContext.pixmap\fP, respectively.
  1032. X.IP
  1033. XIf \fBborder.hilite\fP is undefined, this variable will set it
  1034. Xautomatically.
  1035. X.PP
  1036. X\fBNote that most icon variables only affect icons owned by \fIawm\fP.
  1037. XExcept for foreground and background colors, client created
  1038. Xicons are left alone.\fR
  1039. X.IP "\fBicon.background\fP (string) ``\fBbackground\fP''"
  1040. XIcon (pixmap) background color.
  1041. X.IP "\fBicon.backpixmap\fP (string) ``grey''"
  1042. XPixmap to display as icon background for text icons.
  1043. XNote that this pixmap is only used for "text" icons, I.E. icons
  1044. Xin the \fBuwm\fP style of a line of editable text. This should
  1045. Xtypically be cross hatch pattern or some similar background weave
  1046. Xthat will be displayed surrounding the text. For "pictoral" icons,
  1047. Xuse \fBicon.defpixmap\fP.
  1048. XSee also: \fBpath\fP, \fBicon.foreground\fP, \fBicon.background\fP,
  1049. X\fBicon.defpixmap\fP.
  1050. X.IP "\fBicon.border\fP (string) ``\fBicon.foreground\fP''"
  1051. XColor to use for icon borders.
  1052. X.IP "\fBicon.borderWidth\fP (int) ``2''"
  1053. XWidth of icon border in pixels.
  1054. X.IP "\fBicon.defpixmap\fP (string) ``xlogo''"
  1055. XFor windows that don't specify their own pixmaps, use this image.
  1056. XThis is only useful if \fBicon.labels\fP is turned on.
  1057. X.IP "\fBicon.font\fP (string) ``8x13''"
  1058. XWhich font to use for icon text.
  1059. X.IP "\fBicon.foreground\fP (string) ``\fBforeground\fP''"
  1060. XIcon (pixmap) foreground color.
  1061. X.IP "\fBicon.hPad\fP (int) ``2''"
  1062. XNumber of pixels to pad icon text horizontally.
  1063. X.IP "\fBicon.labels\fP (boolean) ``off''"
  1064. XSpecifys that icons should be displayed in the "twm" style. I.E.
  1065. XThe icon pixmap (or \fBicon.defpixmap\fP if the window has no icon
  1066. Xpixmap) with the icon name displayed underneath (or above, if
  1067. X\fBicon.labelTop\fP is set).
  1068. X.IP "\fBicon.labelTop\fP (boolean) ``off''"
  1069. XSpecifys that "labeled" icons should have the text portion displayed
  1070. Xon top, rather than the bottom. Only useful if \fBicon.labels\fP is
  1071. Xset.
  1072. X.IP "\fBicon.vPad\fP (int) ``2''"
  1073. XNumber of pixels to pad icon text vertically.
  1074. X.IP "\fBicon.text.background\fP (string) ``\fBicon.background\fP''"
  1075. XBackground color to use for icon text.
  1076. X.IP "\fBicon.text.foreground\fP (string) ``\fBicon.foreground\fP''"
  1077. XForeground color to use for icon text.
  1078. X.IP "\fBinstallColormap\fP (boolean) ``false''"
  1079. XInstall a given window's colormap when the pointer enters it.
  1080. XWhen the pointer leaves, the default colormap is installed.
  1081. X.IP "\fBmenu.background\fP (string) ``\fBbackground\fP''"
  1082. XMenu background color.
  1083. X.IP "\fBmenu.boldFont\fP (string) ``8x13bold''"
  1084. XWhich font to use for (textual) menu panes. Currently,
  1085. Xthe only pane using this font is the title pane (unless, of course,
  1086. Xit's a pixmap).
  1087. X.IP "\fBmenu.border\fP (string) ``\fBforeground\fP''"
  1088. XMenu border color.
  1089. X.IP "\fBmenu.borderWidth\fP (int) ``2''"
  1090. XWidth of menu border in pixels.
  1091. X.IP "\fBmenu.delta\fP (int) ``20''"
  1092. XNumber of pixels to move on a "pull-right" pane before the submenu
  1093. Xattached to it is popped up.
  1094. X.IP "\fBmenu.font\fP (string) ``8x13''"
  1095. XWhich font to use in (textual) menu panes.
  1096. X.IP "\fBmenu.foreground\fP (string) ``\fBforeground\fP''"
  1097. XMenu foreground color.
  1098. X.IP "\fBmenu.itemBorder\fP (int) ``1''"
  1099. XWidth of individual (menu) item borders.
  1100. X.IP "\fBmenu.pad\fP (int) ``2''"
  1101. XNumber of pixels to pad menu text/pixmaps vertically.
  1102. X.PP
  1103. XThe following resources pertain only to the RTL Neaten package and are
  1104. Xignored if \fIawm\fP has not been compiled with that option (see the
  1105. XINSTALLATION file).
  1106. X.IP "\fBneaten.absMinWidth\fP (int) ``64''"
  1107. XIndicates the amount of space in pixels, that is used
  1108. Xas the absolute minimum width of a window during the
  1109. Xneaten operation.
  1110. X.IP "\fBneaten.absMinHeight\fP (int) ``64''"
  1111. XIndicates the amount of space in pixels, that is used
  1112. Xas  the absolute minimum height of a window during the
  1113. Xneaten operation.
  1114. X.IP "\fBneaten.retainSize\fP (boolean) ``true''"
  1115. XForces to windows to be at least their current size.
  1116. XWindows may overlap as a side effect.
  1117. X.IP "\fBneaten.fill\fP (boolean) ``true''"
  1118. XAllows windows to grow to their maximum size during
  1119. Xthe neaten  operation. Normally a window will grow only to
  1120. Xthe maximum  of its desired (based on the WM_NORMAL_HINTS property)
  1121. Xand current size.
  1122. X.IP "\fBneaten.fixTopOfStack\fP (boolean) ``true''"
  1123. XFixes the size and location of the window at the top of
  1124. Xthe  window  hierarchy.  If necessary, this window will
  1125. Xoverlap even other windows which can not be tiled.
  1126. X.IP "\fBneaten.keepOpen\fP (boolean) ``true''"
  1127. XConstrains all windows to remain open during the neaten
  1128. Xoperation.   No  windows will be iconized.  This operation
  1129. Xmay cause windows to overlap.
  1130. X.IP "\fBneaten.usePriorities\fP (boolean) ``true''"
  1131. XAssigns the windows priorities based on their stacking
  1132. Xorder (windows closer to the top in the stacking order
  1133. Xare given higher priorities). Priorities are used when
  1134. Xdetermining size and location of windows on the screen.
  1135. X.IP "\fBneaten.primaryIconPlacement\fP (string) ``\fBTop\fP''"
  1136. XSelects the side of the screen where icons are first
  1137. Xplaced.  Legal values are: \fBTop\fP, \fBLeft\fP, \fBBottom\fP, \fBRight\fP and
  1138. X\fBClosest\fP (to its current position).
  1139. X.IP "\fBneaten.secondaryIconPlacement\fP (string) ``\fBLeft\fP''"
  1140. XDetermines where along the specified primary side
  1141. Xthe icon should be placed. Legal values are those for
  1142. X\fBneaten.primaryIconPlacement\fP plus \fBCenter\fP.
  1143. XNot used if \fBneaten.primaryIconPlacement\fP is \fBClosest\fP
  1144. X.IP "\fBnormali\fP (boolean) ``on''"
  1145. XMake sure that icons created with \fBf.newiconify\fP stay wholly within
  1146. Xthe root window (on screen), regardless of attempted placement.
  1147. XIf off, put icons
  1148. Xwherever the cursor is placed.
  1149. X.IP "\fBnormalw\fP (boolean) ``on''"
  1150. XMake sure that windows mapped with \fBf.newiconify\fP are placed on-screen,
  1151. Xregardless of cursor position.
  1152. XIf off, put windows wherever the cursor is placed.
  1153. X.IP "\fBpath\fP (string) ``null''"
  1154. XA number of items (titles, menus, etc) now allow you to specify
  1155. Xa pixmap file, rather than just a text string to display. Since it
  1156. Xwould be tedious to type in full pathnames for these files if they
  1157. Xall lived in the same places, the directory(s) named by \fBpath\fP are
  1158. Xsearched if the pixmap file's pathname does not begin with a slash (/)
  1159. Xor tilde (~) and is not found in the current directory.
  1160. X.IP
  1161. X\fBpath\fP is a white-space separated list of one or more
  1162. Xdirectories to search, much like that used by the Unix C-shell. The ~
  1163. Xnotation used to designate your (or someone else's) home directory is
  1164. Xsupported, but wildcards are not.
  1165. X.IP "\fBpopup.background\fP (string) ``\fBbackground\fP''"
  1166. XBackground color to use for pop-up text.
  1167. X.IP "\fBpopup.borderWidth\fP (int) ``2''"
  1168. XWidth of pop-up window border in pixels.
  1169. X.IP "\fBpopup.font\fP (string) ``9x15''"
  1170. XWhich font to use for popup window text.
  1171. X.IP "\fBpopup.foreground\fP (string) ``"\fBforeground\fP''
  1172. XForeground color to use for pop-up text.
  1173. X.IP "\fBpopup.pad\fP (int) ``4''"
  1174. XNumber of pixels to pad pop-up text horizontally.
  1175. X.IP "\fBpushRelative\fP (boolean) ``on''"
  1176. XWhen a window is pushed, push 1/\fBpush\fP of the window.
  1177. XIf off, move window \fBpush\fP pixels.
  1178. X.IP "\fBraiseDelay\fP (int) ``100''"
  1179. XAmount of time in milliseconds to wait (while window has focus)
  1180. Xbefore raising. If pointer leaves window before time elapses, raise is not
  1181. Xperformed.
  1182. X.IP "\fBreverse\fP (boolean) ``on''"
  1183. XReverse background/foreground colors for titles, menus,
  1184. Xgadget windows, popup windows, etc. In the absence of any color
  1185. Xspecifications, this results in black-on-white.
  1186. X.IP "\fBrootResizeBox\fP (boolean) ``on''"
  1187. XPut the resize (popup) window in the upper left corner of the root
  1188. Xwindow, rather than on the window being resized. This saves a potentially
  1189. Xexpensive refresh that would occur when the popup was unmapped. If your server
  1190. Xsupports save-unders,
  1191. Xit's generally (but not always) better to turn \fBsaveUnder\fP
  1192. Xon instead.
  1193. X.IP "\fBsaveUnder\fP (boolean) ``off''"
  1194. XUse save-unders for menus and pop-up windows. If the server does not
  1195. Xsupport save-unders, this action does nothing.
  1196. X.IP "\fBshowName\fP (boolean) ``on''"
  1197. XDisplay the window name in a title (assuming that the window is titled
  1198. Xin the first place).
  1199. X.IP "\fBtitle.background\fP (string) ``\fBbackground\fP''"
  1200. XBackground color to use for title pixmap.
  1201. X.IP "\fBtitle.boldFont\fP (string) ``none''"
  1202. XWhich font to use for titlebar labels if focus is and
  1203. X\fBhilite\fP is enabled. If this isn't set, and \fBhilite\fP
  1204. Xis, the title text will be displayed with \fBtitle.font\fP in reverse video.
  1205. X.IP "\fBtitle.boldPixmap\fP (string) ``none''"
  1206. XThe name of a pixmap file to load and tile titlebars with when
  1207. Xthe focus is in. If this is defined, and \fBhilite\fP is set, focus changes
  1208. Xwill cause title backgrounds to alternate between \fBtitle.pixmap\fP
  1209. Xand \fBtitle.boldPixmap\fP. If \fBtitle.boldPixmap\fP is defined, but
  1210. X\fBtitle.pixmap\fP is not, a blank pixmap will be used in place of
  1211. X\fBtitle.pixmap\fP.
  1212. X.IP "\fBtitle.cursor\fP (int) ``XC_left_ptr''"
  1213. XGlyph (in decimal) to retrieve from cursor font for use in
  1214. Xtitle bar.
  1215. X.IP "\fBtitle.font\fP (string) ``vtsingle''"
  1216. XWhich font to use for titlebar labels. Used exclusively unless
  1217. X\fBtitle.boldFont\fP and \fBhilite\fP are set.
  1218. X.IP "\fBtitle.foreground\fP (string) ``\fBforeground\fP''"
  1219. XForeground color to use when drawing background (both normal and
  1220. Xbold) pixmaps.
  1221. X.IP "\fBtitle.pad\fP (int) ``2''"
  1222. XNumber of pixels to pad title bar text vertically.
  1223. X.IP "\fBtitle.pixmap\fP (string) ``none''"
  1224. XThe name of a pixmap file to load and tile titlebars with.
  1225. XThis background is use exclusively unless the \fBtitle.boldPixmap\fP is
  1226. Xdefined and \fBhilite\fP is set.
  1227. X.IP "\fBtitle.text.background\fP (string) ``\fBtitle.background\fP''"
  1228. XBackground color to use when drawing title bar text.
  1229. X.IP "\fBtitle.push\fP (boolean) ``false''"
  1230. XWhen adding a title bar or border context to a window, put the border or
  1231. Xtitle bar area at the current x, y position and "push" the window down to
  1232. Xmake room. For windows with an upper edge at or near the top of the screen,
  1233. Xthis gives the most asthetically pleasing results. For windows near the
  1234. Xbottom, it does not.
  1235. XIf set to false, the title bar/border will be added "on top" and the window
  1236. Xwill not be moved down. Note that the setting of this resource also affects
  1237. Xhow the window is maniplated during resizes, title removals, etc.
  1238. X.IP "\fBtitle.text.foreground\fP (string) ``\fBtitle.foreground\fP''"
  1239. XForeground color to use when drawing title bar.
  1240. X.IP "\fBtitles\fP (boolean) ``off''"
  1241. XPut title bars on all windows (both existing windows and new ones as
  1242. Xthey're created. See also: \fBf.title\fP
  1243. X.IP "\fBvolume\fP (int) ``2''"
  1244. XSpecifies the bell volume (delta on volume set with \fIxset\fP).
  1245. X.IP "\fBwall\fP (boolean) ``off''"
  1246. XRestrict window movement to edges of screen (rootwindow).
  1247. XThis feature is fairly handy and should probably be bound to a menu
  1248. Xso that it can readily be turned on and off.
  1249. X.IP "\fBwarpOnDeIconify\fP (boolean) ``off''"
  1250. XWarp pointer to upper right corner of window on de-iconify.
  1251. X.IP "\fBwarpOnIconify\fP (boolean) ``off''"
  1252. XWarp pointer to center of icon on iconify.
  1253. X.IP "\fBwarpOnRaise\fP (boolean) ``off''"
  1254. XWarp pointer to upper left corner of window on raise.
  1255. X.IP "\fBwindowName.offset\fP (int) ``0''"
  1256. XNumber of pixels from the right or left edge of a titlebar
  1257. Xto print the window name (assuming that \fBshowName\fP is set).
  1258. XIf this value is negative, the name will be offset \fBnameOffset\fP
  1259. X(plus the name length) pixels from the right edge. If the value
  1260. Xis positive, then the name will be offset \fBnameOffset\fP pixels
  1261. Xfrom the left edge. If the value is zero, the name will be centered.
  1262. XSince the length of a window name can vary dynamically, this value
  1263. Xwill be adjusted, when necessary, to ensure that the name is visible in
  1264. Xthe title bar.
  1265. X.IP "\fBzap\fP (boolean) ``off''"
  1266. XCauses ghost lines to follow the window or icon from its previous
  1267. Xlocation to its new location during a move, resize or iconify operation.
  1268. X.PP
  1269. X.SH SPECIAL RESOURCES
  1270. X.IP "\fIname\fP\fB.wm_option.autoRaise\fP (boolean) "
  1271. X.IP "\fIname\fP\fB.wm_option.borderContext\fP (boolean) "
  1272. X.IP "\fIname\fP\fB.wm_option.gadgets\fP (boolean) "
  1273. X.IP "\fIname\fP\fB.wm_option.icon.labels\fP (boolean) "
  1274. X.IP "\fIname\fP\fB.wm_option.title\fP (boolean) "
  1275. X.IP "\fIname\fP\fB.wm_option.foreground\fP (string) " [ Only if -DRAINBOW ]
  1276. X.IP "\fIname\fP\fB.wm_option.background\fP (string) " [ Only if -DRAINBOW ]
  1277. X
  1278. XThese resources determine whether or not a given application really wants
  1279. Xa title, gadgets, border context area, to be auto-raised etc etc..
  1280. XThe application's CLASS and NAME (in the WM_CLASS property) are checked
  1281. Xagainst the string supplied for \fIname\fP (for example:
  1282. XXclock*wm_option.title:  off).
  1283. X.IP
  1284. XSpecifying one of these resources overrides any other boolean
  1285. Xsettings (I.E. \fBawm.titles\fP or \fBawm.gadgets\fP) and
  1286. Xmay be used to turn things on and off at the application and/or
  1287. Xclass level for applications, regardless of \fBawm\fP's settings.
  1288. X
  1289. XNote: Both class and name resources are checked, and in that order. Thus
  1290. Xspecific applications may override settings for their class, if desired.
  1291. X.IP
  1292. XThese resources are ``special'' as they are checked for under the
  1293. Xapplication's name, not \fIawm\fP's; I.E. \fBxclock.wm_option.autoRaise\fP
  1294. Xis not \fBawm.xclock.wm_option.autoRaise\fP as one might think.
  1295. X
  1296. XThe resources \fBwm_option.foreground\fP and \fBwm_option.background\fP are
  1297. Xonly meaningful if awm has been compiled with -DRAINBOW. They allow
  1298. Xthe border color to be specified for individual applications/classes.
  1299. X.bp
  1300. X.SH EXAMPLES
  1301. X.PP
  1302. XThe following sample startup file shows the default window
  1303. Xmanager options:
  1304. X.EX
  1305. X# Global variables
  1306. X#
  1307. Xresetbindings
  1308. Xresetmenus
  1309. X#
  1310. X# Mouse button/key maps
  1311. X#
  1312. X# FUNCTION    KEYS  CONTEXT  BUTTON    MENU(if any)
  1313. X# ========    ====  =======  ======    ============
  1314. Xf.menu =      meta  :     :left down   :"WINDOW OPS"
  1315. Xf.menu =      meta  :     :middle down :"EXTENDED WINDOW OPS"
  1316. Xf.move =      meta  :w|i  :right down
  1317. Xf.circleup =  meta  :root :right down
  1318. X#
  1319. X# Menu specifications
  1320. X#
  1321. Xmenu = "WINDOW OPS" {
  1322. X"(De)Iconify":  f.iconify
  1323. XMove:           f.move
  1324. XResize:         f.resize
  1325. XLower:          f.lower
  1326. XRaise:          f.raise
  1327. X}
  1328. X
  1329. Xmenu = "EXTENDED WINDOW OPS" {
  1330. XCreate Window:                  !"xterm &"
  1331. XIconify at New Position:        f.lowericonify
  1332. XFocus Keyboard on Window:       f.focus
  1333. XFreeze All Windows:             f.pause
  1334. XUnfreeze All Windows:           f.continue
  1335. XCirculate Windows Up:           f.circleup
  1336. XCirculate Windows Down:         f.circledown
  1337. X}
  1338. X.EE
  1339. X.bp
  1340. X.PP
  1341. X.SH RESTRICTIONS
  1342. X.PP
  1343. XThe color specifications have no effect on a monochrome system.
  1344. XThere's currently no way to specify a keysym in place of a button
  1345. X(up/down/delta) specification. This restriction will be removed in
  1346. Xthe near future.
  1347. X.PP
  1348. X.SH FILES
  1349. X.PP
  1350. X.nf
  1351. X$LIBDIR/rgb.txt 
  1352. X$LIBDIR/font 
  1353. X/usr/skel/.awmrc
  1354. X$LIBDIR/awm/system.awmrc
  1355. X$HOME/.awmrc
  1356. X.fi
  1357. X.PP 
  1358. X.SH SEE ALSO
  1359. X.PP
  1360. XX(1), X(8C)
  1361. X.SH AUTHOR
  1362. X.PP
  1363. X.ce 3
  1364. XCopyright 1988
  1365. XArdent Computer Corporation
  1366. XSunnyvale, Ca
  1367. X.PP
  1368. XAll Rights Reserved
  1369. XPermission to use, copy, modify, and distribute this software and its
  1370. Xdocumentation for any purpose and without fee is hereby granted,
  1371. Xprovided that the above copyright notice appear in all copies and that
  1372. Xboth that copyright notice and this permission notice appear in
  1373. Xsupporting documentation, and that the name of Ardent Computer
  1374. XCorporation or the author not be used in advertising or publicity
  1375. Xpertaining to distribution of the software without specific, written
  1376. Xprior permission.
  1377. X.PP
  1378. X.ce 3
  1379. XCOPYRIGHT 1985, 1986
  1380. XDIGITAL EQUIPMENT CORPORATION
  1381. XMAYNARD, MASSACHUSETTS
  1382. XALL RIGHTS RESERVED.
  1383. X.LP
  1384. XTHE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE AND
  1385. XSHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION.
  1386. XDIGITAL MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THIS SOFTWARE FOR
  1387. XANY PURPOSE.  IT IS SUPPLIED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
  1388. X.LP
  1389. XIF THE SOFTWARE IS MODIFIED IN A MANNER CREATING DERIVATIVE COPYRIGHT RIGHTS,
  1390. XAPPROPRIATE LEGENDS MAY BE PLACED ON THE DERIVATIVE WORK IN ADDITION TO THAT
  1391. XSET FORTH ABOVE.
  1392. X.LP
  1393. XPermission to use, copy, modify, and distribute this software and its
  1394. Xdocumentation for any purpose and without fee is hereby granted, provided
  1395. Xthat the above copyright notice appear in all copies and that both that
  1396. Xcopyright notice and this permission notice appear in supporting documentation,
  1397. Xand that the name of Digital Equipment Corporation not be used in advertising
  1398. Xor publicity pertaining to distribution of the software without specific, 
  1399. Xwritten prior permission.
  1400. X.PP
  1401. XM. Gancarz,
  1402. XDEC Ultrix Engineering Group, Merrimack, New Hampshire, using some algorithms
  1403. Xoriginally by Bob Scheifler, MIT Laboratory for Computer Science
  1404. X.PP
  1405. XJ. Hubbard, U.C. Berkeley, Berkeley, Ca. Ardent Computer, Sunnyvale,
  1406. XCa. Various modifications and enhancements using code developed by M.
  1407. XGancarz and Digital Equipment Corp.
  1408. END_OF_FILE
  1409. if test 41691 -ne `wc -c <'awm.man'`; then
  1410.     echo shar: \"'awm.man'\" unpacked with wrong size!
  1411. fi
  1412. # end of 'awm.man'
  1413. fi
  1414. echo shar: End of archive 2 \(of 12\).
  1415. cp /dev/null ark2isdone
  1416. MISSING=""
  1417. for I in 1 2 3 4 5 6 7 8 9 10 11 12 ; do
  1418.     if test ! -f ark${I}isdone ; then
  1419.     MISSING="${MISSING} ${I}"
  1420.     fi
  1421. done
  1422. if test "${MISSING}" = "" ; then
  1423.     echo You have unpacked all 12 archives.
  1424.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1425. else
  1426.     echo You still need to unpack the following archives:
  1427.     echo "        " ${MISSING}
  1428. fi
  1429. ##  End of shell archive.
  1430. exit 0
  1431. -- 
  1432. Mike Wexler(wyse!mikew)    Phone: (408)433-1000 x1330
  1433. Moderator of comp.sources.x
  1434.